import Vue from 'vue'
import Vuex from 'vuex'
import getters from './getters'
import app from './modules/app'
import settings from './modules/settings'
import user from './modules/user'
import menu from './modules/menu'
// 插件持久化报存
// import persist from 'vuex-persistedstate'
Vue.use(Vuex)

const store = new Vuex.Store({
  // 会自动保存状态，刷新时不会丢失
  // plugins: [
  //   persist()
  // ],
  modules: {
    app,
    settings,
    user,
    menu
  },
  getters
})

export default store
